package com.buddy.learn.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author buddy
 */

@Component
@Slf4j
@RocketMQMessageListener(consumerGroup = "test-topic-consumer-group",
        topic = "test-topic",
        selectorExpression = "*"
)
public class MqConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        log.info("MqConsumer consumeMessage, message={}", message);
    }
}
